import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import '../../../common/style/extension_util.dart';
import 'package:get/get.dart';
import '../../style/app_style.dart';

class BgImageDialog extends StatelessWidget {
  const BgImageDialog({super.key,this.onlyOne = false,this.svgName,this.onPressed});
  final bool? onlyOne;
  final String? svgName;
  final Function()? onPressed;
  @override
  Widget build(BuildContext context) {
    return  Stack(children: [
      Utils.getSvgImage("alert_service").addContainer(width: 283.w,height: 350.w,color: Colors.transparent),
      Positioned(left: 20,bottom: 20,width: 105,child:
      AppButton.sizeBtn(() {
        SmartDialog.dismiss();
      }, const SizedBox(width: 60,height: 45,),bgColor: Colors.transparent)
          // .addVisibility(onlyOne == true)
      ),
      Positioned(right: 20,bottom: 20,width: 105,child:
      AppButton.sizeBtn(() {
        SmartDialog.dismiss();
        onPressed?.call();
      },  const SizedBox(width: 60,height: 45,),bgColor: Colors.transparent)
          // .addVisibility(onlyOne == true)
      ),
      Positioned(right: 20,bottom: 20,left: 20,child:
      AppButton.sizeBtn(() {
        SmartDialog.dismiss();
        onPressed?.call();
      },   SizedBox(width: 60,height: 45,),bgColor: Colors.transparent).addVisibility(onlyOne == true)
      ),

    ],);
  }
}
